package com.xiaoyang.mapper;

import com.xiaoyang.bean.TUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;

/**
 * @author lichenyang
 * @create 2021-07-15 07:46
 *
 * springboot整合myBatis 使用注解方式访问数据库信息
 */
@Mapper
public interface UserMapper {
    TUser getUser(Long id);

    @Select("select * from t_user where id = #{id}")
    @Options(useGeneratedKeys = true, keyProperty = "id")
    public TUser getUserAnn(Long id);
}
